#!/usr/bin/python
# -*- coding: UTF-8 -*-

#cron：0 8,15,20 * * *
"""
File: 希沃测试.py
Author: shuaiqidelinlaoshi
cron：0 8,15,20 * * *
new Env('希沃测试');
Update: 2024/11/25
"""
import json
import re
import requests
import time
import datetime
import base64
import os
import sys
import random
from collections import defaultdict
from datetime import datetime

# 定义两个账号信息，实际应用中可根据需要扩展账号数量
# 从环境变量中获取账号密码信息
env_accounts_info = os.environ.get('xiwo')

# 解析环境变量中的账号密码信息，存储为账号字典列表
accounts = []
if env_accounts_info:
    account_pairs = env_accounts_info.split('@')
    for pair in account_pairs:
        username, password = pair.split('&')
        accounts.append({'username': username, 'password': password})
else:
    print("环境变量中未获取到账号密码信息，请检查设置！")

# 加载通知服务（原代码中的函数，未做修改，假设其功能正常）
def load_send():
    cur_path = os.path.abspath(os.path.dirname(__file__))
    sys.path.append(cur_path)
    if os.path.exists(cur_path + "/notify2.py"):
        try:
            from notify2 import send
            return send
        except Exception as e:
            print(f"加载通知服务失败：{e}")
            return None
    else:
        print("加载通知服务失败")
        return None


# 根据账号获取token
def token(account):
    headers = {
        'Cookie': 'x-auth-app=EasiNote5; x-auth-token=; acw_tc=1a0c595817308041547308041547398024e00e398f9ff3f4cdf743e11908bdb62cff81d',
        'X-APM-TraceId': '6a7e4cf4c71645dfb92c37d12f17709',
        'Content-Type': 'application/json; charset=utf-8',
        'Content-Length': '109'}
    payload1 = base64.b64decode(account['password'])
    html = requests.request("POST", "https://edu.seewo.com/api/v1/auth/login", headers=headers, data=payload1)
    a = json.loads(html.text)
    token = a["data"]["token"]
    print(f'获取账号 {account["username"]} 的最新token：{token}')
    return token

#查询今日积分获取：
def meitianexp(token):
    """
    提取当天的experience总和存入变量todayexp，当天的“experience”、“from”、“date”存入变量todaydetail（类型str，换行print格式），
    以及每天总共获取了多少experience，存入变量everydayexp（类型str），并返回这三个结果。
    """  
    headers = {
        'sec-ch-ua-platform': '"Windows"',
        'x-requested-with': 'XMLHttpRequest',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0',
        'accept': '*/*',
        'sec-ch-ua': '"Microsoft Edge";v="131", "Chromium";v="131", "Not_A Brand";v="24"',
        'sec-ch-ua-mobile': '?0',
        'sec-fetch-site': 'same-origin',
        'sec-fetch-mode': 'cors',
        'sec-fetch-dest': 'empty',
        'referer': 'https://easinote.seewo.com/myroad',
        'accept-encoding': 'gzip, deflate, br, zstd',
        'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
        'priority': 'u=1, i',
        'cookie': f'acw_tc=1a0c57d817322533344895072e003ffd94dd0826549f9a66c978f78ad1d515; sw_sid=user_undefined; x-token={token}; x-samesite-none-token={token}; x-username=15779752720; userId=5f20ea0cfbff401dbb7119eb7cf7d530; x-auth-token={token}'}
    payload = None

    response0 = requests.request("GET", "https://easinote.seewo.com/myroad/data?index=0&pagesize=66", headers=headers,data=payload)
    data_json = response0.text
    data_dict = json.loads(data_json)
    content_list = data_dict["data"]["content"]

    # 获取今天的日期（格式：'2024-11-25'）
    today = datetime.now().strftime('%Y-%m-%d')

    todayexp = 0
    today_source_exp = defaultdict(int)
    todaydetail = ""
    # 使用defaultdict来方便地统计每天的总经验值，默认值初始化为0
    everydayexp = defaultdict(int)

    for record in content_list:
        record_date = record["date"].split(" ")[0]
        if record_date == today:
            todayexp += record["experience"]
            #todaydetail += f"\n☀️经验值: {record['experience']},\n🌟来源: {record['from']},\n🌙时间: {record['date']}\n"
            #todaydetail += '-'*30
            source = record["from"]
            today_source_exp[source] += record["experience"]
        everydayexp[record_date] += record["experience"]
    for source, exp in today_source_exp.items():
        todaydetail += f"\n☀️经验值: {exp},\n🌟来源: {source},\n🌙时间: {today}\n"
        todaydetail += '-'*30
    # 将每天的经验值统计结果转换为字符串格式
    everydayexp_str = ""
    for date, exp in everydayexp.items():
        everydayexp_str += f"{date}获得: {exp}\n"

    return todayexp, todaydetail, everydayexp_str
# 假设data_json就是你提供的那段JSON数据
'''
result = meitianexp()
todayexp, todaydetail, everydayexp = result


print(f"今天的经验值总和: {todayexp}")
print("今天的详细记录:")
print(todaydetail)
print("每天的经验值统计:")
print(everydayexp)
'''

# 查询用户信息
def chaxun(token):
    headers = {
        'Cookie': f'x-auth-token={token}; x-auth-app=EasiNote5; x-auth-brand=; client_version=5.2.4.8298; client_build_version=108298; client_flags=tabs; acw_tc=1a0c57d717310419592552369e010287431d3cb1c78b1f45ad77f675fa3b95',
        'X-APM-TraceId': '20a05125e71b4511b3867ff9d0a91fc9',
        'x-auth-app': 'EasiNote5',
        'x-auth-brand': '',
        'x-auth-timestamp': '1731043604156',
        'x-auth-sign': 'e768cae5914b7bf94af8d62c5d2a0b640fbb0acbb9808c8e100ea890d4fafa37'}
    payload = None

    response0 = requests.request("GET", "https://edu.seewo.com/api/v1/user/level", headers=headers, data=payload)
    mingzi = response0.json()["userLevel"]["nickName"]
    kongjian = response0.json()["userLevel"]["cloudSize"]
    kongjian1 = kongjian / 1024 / 1024 / 1024
    xianzaijingyan = response0.json()["userLevel"]["experience"]
    jibie = response0.json()["userLevel"]["level"]
    #shengjihaixu = response0.json()["userLevel"]["needExperience"]
    if account["username"] == '老宝宝':
        shengjihaixu = response0.json()["userLevel"]["needExperience"]
        msg = f'用户姓名：{mingzi}\n现在级别：{jibie}\n现在空间：{kongjian1} GB\n现在经验：{xianzaijingyan}\n升级还需：{shengjihaixu}'
    else:
        msg = f'用户姓名：{mingzi}\n现在级别：{jibie}\n现在空间：{kongjian1} GB\n现在经验：{xianzaijingyan}'
    return msg


# 查询当天是否已签到及签到奖励等信息
def qiandaochaxun(token):
    headers = {
        'sec-ch-ua': '"Chromium";v="101"',
        'accept': '*/*',
        'x-requested-with': 'XMLHttpRequest',
        'sec-ch-ua-mobile': '?0',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 EasiNote5/5.2.4.8298 Safari/537.36',
        'sec-ch-ua-platform': '"Windows"',
        'accept-language': 'zh-CN,zh;q=0.9',
        'sec-fetch-site': 'same-origin',
        'sec-fetch-mode': 'cors',
        'sec-fetch-dest': 'empty',
        'referer': 'https://easinote.seewo.com/embedpc/mission?type=1',
        'accept-encoding': 'gzip, deflate, br',
        'cookie': f'x-auth-token={token}; x-token={token}; x-auth-app=EasiNote5; x-auth-brand=; phone=15779752720; app-versions=5.2.4.8298; x-custom-version=Standard; sw_sid=user_undefined; EGG_SESS=3qeRnwijbM8VmHvY72woD46e7vbayEbD7o0Wce6PfSSBoSnsAVaeFrfZQk5XjBI4OQejhVHNlgBaU5qh83DiNl-K41awlIEpwsEGcyL8TKvX_t4C3GHj37O_olqrT8lJPxsSXvoZv1z6PgbjZU_7v_P9qLaOFjWxxmWj9iF_l98=; Hm_lvt_4ef81bf49656fa38a45b802406a5f13c=1730804267; Hm_lpvt_4ef81bf49656fa38a45b802406a5f13c=1730804267; HMACCOUNT=F4C64553A9D562AC; acw_tc=ac11000117308065611647345e00a3e159b7a028819a34f374c800f4fddc35'}
    payload = None

    response0 = requests.request("GET",
                                 "https://easinote.seewo.com/embedpc/com/apis?api=MISSION_TODAY_RECORD&_=1730806525025",
                                 headers=headers, data=payload)
    jiangli1 = response0.json()["data"]["lotteryRecord"]["prizeName"]
    jiangli2 = response0.json()["data"]["signRecord"]["prizeName"]
    qiandaotianshu =  response0.json()["data"]["signRecord"]["currentDay"]
    msg = f'今天已经签到过了，已签到{qiandaotianshu} 天，\n签到获得：{jiangli1}和{jiangli2}'
    return msg


# 执行签到操作
def qiandao(token):
    headers = {
        'sec-ch-ua': '"Chromium";v="101"',
        'accept': '*/*',
        'x-requested-with': 'XMLHttpRequest',
        'sec-ch-ua-mobile': '?0',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 EasiNote5/5.2.4.8298 Safari/537.36',
        'sec-ch-ua-platform': '"Windows"',
        'accept-language': 'zh-CN,zh;q=0.9',
        'sec-fetch-site': 'same-origin',
        'sec-fetch-mode': 'cors',
        'sec-fetch-dest': 'empty',
        'referer': 'https://easinote.seewo.com/embedpc/mission?type=1',
        'accept-encoding': 'gzip, deflate, br',
        'cookie': f'x-auth-token={token}; x-token={token}; x-auth-app=EasiNo5; x-auth-brand=; phone=15779752720; app-versions=5.2.4.8298; x-custom-version=Standard; acw_tc=1a0c579817308043018994766e0049f651f779475fdc0737e5437ebceb8694; sw_sid=user_undefined; EGG_SESS=3qeRnwijbM8VmHvY72woD46e7vbayEbD7o0Wce6PfSSBoSnsAVaeFrfZQk5XjBI4OQejhVHNlgBaU5qh83DiNl-K41awlIEpwsEGcyL8TKvX_t4C3GHj37O_olqrT8lJPxsSXvoZv1z6PgbjZU_7v_P9qLaOFjWxxmWj9iF_l98=; Hm_lvt_4ef81bf49656fa38a45b802406a5f13c=1730804267; Hm_lpvt_4ef81bf49656fa38a45b802406a5f13c=1730804267; HMACCOUNT=F4C64553A9D562AC'}
    payload = None
    t = time.time()
    timestamp = int(round(t * 1000))
    time.sleep(random.random() * 10)
    response0 = requests.request("GET",f"https://easinote.seewo.com/embedpc/com/apis?api=MISSION_SIGN_LOTTERY&_={timestamp}",headers=headers, data=payload)
    result = response0.json()["message"]
    print(result)
    if result == 'ok':
        jiangli1 = response0.json()["data"]["lotteryRecord"]["prizeName"]
        jiangli2 = response0.json()["data"]["signRecord"]["prizeName"]
        qiandaotianshu =  response0.json()["data"]["signRecord"]["currentDay"]
        msg = f'签到成功，已签到{qiandaotianshu} 天，\n签到获得：{jiangli1}和{jiangli2}'
        print(msg)
    elif result == 'sign lottery fail':
        msg = qiandaochaxun(token)
        print(qiandaochaxun(token))
    else:
        msg = '登录失败了吧？快检查一下原因'
        print(msg)
    return msg


# 检查任务是否开始
def taskbegin(token):
    headers = {
        'sec-ch-ua': '"Chromium";v="101"',
        'accept': '*/*',
        'x-requested-with': 'XMLHttpRequest',
        'sec-ch-ua-mobile': '?0',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 EasiNote5/5.2.4.8298 Safari/537.36',
        'sec-ch-ua-platform': '"Windows"',
        'accept-language': 'zh-CN,zh;q=0.9',
        'sec-fetch-site': 'same-origin',
        'sec-fetch-mode': 'cors',
        'sec-fetch-dest': 'empty',
        'referer': 'https://easinote.seewo.com/embedpc/mission?type=1',
        'accept-encoding': 'gzip, deflate, br',
        'cookie': f'x-auth-token={token}; x-token={token}; x-auth-app=EasiNote5; x-auth-brand=; phone=15779752720; app-versions=5.2.4.8298; x-custom-version=Standard; acw_tc=1a0c579817308043018994766e0049f651f779475fdc0737e5437ebceb8694; sw_sid=user_undefined; EGG_SESS=3qeRnwijbM8VmHvY72woD46e7vbayEbD7o0Wce6PfSSBoSnsAVaeFrfZQk5XjBI4OQejhVHNlgBaU5qh83DiNl-K41awlIEpwsEGcyL8TKvX_t4C3GHj37O_olqrT8lJPxsSXvoZv1z6PgbjZU_7v_P9qLaOFjWxxmWj9iF_l98=; Hm_lvt_4ef81bf49656fa38a45b802406a5f13c=1730804267; Hm_lpvt_4ef81bf49656fa38a45b802406a5f13c=1730804267; HMACCOUNT=F4C64553A9D562AC'}

    payload = None
    response0 = requests.request("GET", "https://easinote.seewo.com/embedpc/com/apis?api=MISSION_TASK&_=1730804266508",headers=headers, data=payload)
    result = response0.json()["message"]
    if result == 'ok':
        msg = '今天的希沃任务已经开始了！'
    else:
        msg = '登录失败了吧？快检查一下原因'
    return msg


# 执行任务操作（续）
def zuorenwu(token):
    headers = {
        'User-Agent': 'Fiddler-Everywhere',
        'Content-Type': 'application/json',
        'Content-Length': '25',
        'Cookie': f'x-auth-token={token}; x-auth-app=EasiNote5; x-auth-brand=; client_version=5.2.4.8298; client_build_version=108298; client_flags=tabs; acw_tc=1a0c579a17308060776735972e00746bb2fa3fa65f8eacc5480f74fb54d982',
        'X-APM-TraceId': '002c1a9b993c4c30874f771c57a5c0d4',
        'x-auth-app': 'EasiNote5',
        'x-auth-brand': '',
        'x-auth-timestamp': '1730806042507',
        'x-auth-sign': '56fb83e79be2c094617386271948b00765a8cb8fa685c24b65c581d69214fa5c',
        'Content-Type': 'application/json; charset=utf-8'}
    payload = base64.b64decode("eyJ0YXNrSWQiOjMsInBhcmFtIjoiMzEifQ==")

    headers1 = {
        'User-Agent': 'Fiddler-Everywhere',
        'Content-Length': '23',
        'Cookie': f'x-auth-token={token}; x-auth-app=EasiNote5; x-auth-brand=; client_version=5.2.4.8298; client_build_version=108298; client_flags=tabs; acw_tc=1a0c579a17308060776735972e00746bb2fa3fa65f8eacc5480f74fb54d982',
        'X-APM-TraceId': '48ff827e08044a4ebf95b822460e1052',
        'x-auth-app': 'EasiNote5',
        'x-auth-brand': '',
        'x-auth-timestamp': '1730806052309',
        'x-auth-sign': '1241620f674cb479c3a4cbcaea73d82ea818611712c0f02b1588fb7a85c313d4',
        'Content-Type': 'application/json; charset=utf-8'}
    headers4 = {
        'Cookie': f'x-auth-token={token}; x-auth-app=EasiNote5; x-auth-brand=; client_version=5.2.4.8298; client_build_version=108298; client_flags=tabs; acw_tc=1a0c57d817309915802155000e01046c3e3f53cc02f1bef502e5b1002519a3',
        'X-APM-TraceId': '8d8c4d46ab51490faf8703a3cfd3efd3',
        'x-auth-app': 'EasiNote5',
        'x-auth-brand': '',
        'x-auth-timestamp': '1730991604217',
        'x-auth-sign': 'd9acbc514ee8c37e18787f4c35f9e39fb006105164aa195278aa4c03ac257fbd',
        'Content-Type': 'application/json; charset=utf-8',
        'Content-Length': '23'}
    headers5 = {
        'Cookie': f'x-auth-token={token}; x-auth-app=EasiNote5; x-auth-brand=; client_version=5.2.4.8298; client_build_version=108298; client_flags=tabs; acw_tc=1a0c579a17308060776735972e00746bb2fa3fa65f8eacc5480f74fb54d982',
        'X-APM-TraceId': 'c39cfa437ce84f0ab56cf703523b2c13',
        'x-auth-app': 'EasiNote5',
        'x-auth-brand': '',
        'x-auth-timestamp': '1730806356642',
        'x-auth-sign': 'ecae5cb7691da202636113b3da128ef51c244d9a244781bc73e7c6bef0cae572',
        'Content-Type': 'application/json; charset=utf-8',
        'Content-Length': '23'}
    payload1 = base64.b64decode("eyJ0YXNrSWQiOjIsInBhcmFtIjoiIn0=")
    payload2 = base64.b64decode("eyJ0YXNrSWQiOjQsInBhcmFtIjoiIn0=")
    payload3 = base64.b64decode("eyJ0YXNrSWQiOjUsInBhcmFtIjoiIn0=")
    for i in range(5):
        response0 = requests.request("POST", "https://edu.seewo.com/api/v2/task/log", headers=headers, data=payload)
        result = response0.json()["message"]
        if result == 'task not begin':
            taskbegin(token)
        time.sleep(random.random() * 10)
        response3 = requests.request("POST", "https://edu.seewo.com/api/v2/task/log", headers=headers1, data=payload1)
        time.sleep(random.random() * 10)
        response7 = requests.request("POST", "https://edu.seewo.com/api/v2/task/log", headers=headers5, data=payload3)
        time.sleep(random.random() * 10)
        response6 = requests.request("POST", "https://edu.seewo.com/api/v2/task/log", headers=headers4, data=payload2)
        print(response0.text)
        print(response3.text)
        print(response7.text)
        print(response6.text)


# 领取任务奖励
def lingqujiangli(token):
    headers1 = {
        # PUT https://easinote.seewo.com/embedpc/com/apis?api=MISSION_TASK_FINISH HTTP/1.1
        'Host': 'easinote.seewo.com',
        'Connection': 'keep-alive',
        'Content-Length': '9',
        'sec-ch-ua': '"Chromium";v="91"',
        'Accept': '*/*',
        'X-Requested-With': 'XMLHttpRequest',
        'sec-ch-ua-mobile': '?0',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        'Accept-Language': '',
        'Origin': 'https://easinote.seewo.com',
        'Sec-Fetch-Site': 'same-origin',
        'Sec-Fetch-Mode': 'cors',
        'Sec-Fetch-Dest': 'empty',
        'Referer': 'https://easinote.seewo.com/embedpc/mission?type=1',
        'Accept-Encoding': 'gzip, deflate, br',
        'Cookie': f'Hm_lvt_67f101c3c1685f877ac534ff2517d656=1631935311; sw_sid=user_undefined; x-auth-token={token}; x-token={token}; x-auth-app=EasiNote5; x-auth-brand=; phone=15779752720; app-versions=5.2.0.6718; x-custom-version=Standard; x-special-version=; EGG_SESS=3qeRnwijbM8VmHvY72woD73u8dVJCiGv4iQsyDaU0VrkyyjG8x7ruBf7bs-derL1BKcUKDahUJePY63hUiXXFLyQ7JQm1NRntmV6dT09Y-ax_Yf1vd6sh4g9DzBu_odxrXegZp_AzIyF0jrRiFnnbyb6C88l-Yqite-HLbk6q_Y=; Hm_lvt_4ef81bf49656fa38a45b802406a5f13c=1638888510,1638961281,1639568415; ab_uid=5f9522cc9d0d88fde1d40b459bb1feb3; Hm_lpvt_4ef81bf49656fa38a45b802406a5f13c=1639572104',

        # taskId=2
    }
    renwuid = [1, 2, 3, 4, 5, 99]
    for id in renwuid:
        time.sleep(random.random() * 10)
        print(id)
        if id == 99:
            print("先执行这个")
            taskbegin(token)
        url2 = 'https://easinote.seewo.com/embedpc/com/apis?api=MISSION_TASK_FINISH'
        params1 = {'taskId': id}
        res1 = requests.put(url=url2, data=params1, headers=headers1)
        print(res1.text)


# 查询任务相关信息
def chaxunrenwu(token):
    zuorenwu(token)
    lingqujiangli(token)

    def extract_name_and_currentTip(json_data):
        result_dict = {}

        if isinstance(json_data, dict):
            currentTip = json_data.get("currentTip")
            name = json_data.get("name")
            if currentTip is not None:
                result_dict[name] = currentTip
            for key, value in json_data.items():
                result_dict.update(extract_name_and_currentTip(value))
        elif isinstance(json_data, list):
            for item in json_data:
                result_dict.update(extract_name_and_currentTip(item))

        return result_dict

    headers = {
        'sec-ch-ua': '"Chromium";v="101"',
        'accept': '*/*',
        'x-requested-with': 'XMLHttpRequest',
        'sec-ch-ua-mobile': '?0',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 EasiNote5/5.2.4.8298 Safari/537.36',
        'sec-ch-ua-platform': '"Windows"',
        'accept-language': 'zh-CN,zh;q=0.9',
        'sec-fetch-site': 'same-origin',
        'sec-fetch-mode': 'cors',
        'sec-fetch-dest': 'empty',
        'referer': 'https://easinote.seewo.com/embedpc/mission?type=1',
        'accept-encoding': 'gzip, deflate, br',
        'cookie': f'x-auth-token={token}; x-token={token}; x-auth-app=EasiNote5; x-auth-brand=; phone=15779752720; app-versions=5.2.4.8298; x-custom-version=Standard; acw_tc=ac11000117310361574458097e003bc084b9394f185f85413d8cb596d93dc; sw_sid=user_undefined; EGG_SESS=3qeRnwijbM8VmHvY72woD05HZ3k10AEk-cGnadWjmyQX7oZyTzM7J3YliqDX1kQsoGKREAvYFQ9Vq0NvkMs58AvGokV7IFCgjgeUiSB9cnkuwynI_igTT6cSJOar9GWezBCXH0E74BVbzpHx8E6iBgDTdNuRIRIeOUKlcjbETeo=; Hm_lvt_4ef81bf49656fa38a45b802406a5f13c=1730804267,1730991582,1731036121; Hm_lpvt_4ef81bf49656fa38a45b802406a5f13c=1731036121; HMACCOUNT=B65A7F6BED828215'}
    payload = None

    response = requests.request("GET", "https://easinote.seewo.com/embedpc/com/apis?api=MISSION_TASK&_=1731036120324",
                                headers=headers, data=payload)

    # 检查请求是否成功
    if response.status_code == 200:
        # 获取响应中的JSON数据
        json_data_obj = response.json()

        # 调用函数提取满足条件的name值和对应的currentTip值
        result = extract_name_and_currentTip(json_data_obj)

        # 将结果转化为字符串并换行显示
        result_str = ""
        for name, currentTip in result.items():
            result_str += f"{name}: {currentTip}\n"

    else:
        print(f"请求失败，状态码: {response.status_code}")
    return result_str


if __name__ == "__main__":
    title = "希沃任务通知(多账号)"
    contents = []
    for account in accounts:
        token_value = token(account)
        result = meitianexp(token_value)
        todayexp, todaydetail, everydayexp = result
        if todayexp > 160:
            #contents += [f"------🌸{account['username']}🌸的任务明细------\n"]
            contents += [f"\n--------🌸{account['username']}🌸今天经验值--------\n\n今天共获得{todayexp}经验🌈!\n"]
            contents += [f"\n--------🌸{account['username']}🌸的经验值明细--------\n{todaydetail}\n"]
            contents += [f"\n--------🌸{account['username']}🌸的经验值统计--------\n\n{everydayexp}\n"]
        else:
            b = f'--------🌸用户信息({account["username"]})🌸-------'
            c = f'--------🌸签到任务({account["username"]})🌸-------'
            d = f'--------🌸其它任务({account["username"]})🌸-------'
            e = f'--------🌸任务完成({account["username"]})🌸-------'
            content = f'{b}\n{chaxun(token_value)}\n\n{c}\n{qiandao(token_value)}\n\n{d}\n{chaxunrenwu(token_value)}\n{e}\n{chaxun(token_value)}\n\n'
            contents.append(content)
            print(content)
    contents_str = "".join(contents)
    print(contents_str)
    send_notify = load_send()
    send_notify(title, contents_str)
    
